package com.itheima.myCountDownLatch;

import java.util.concurrent.CountDownLatch;

public class Test {
    public static void main(String[] args) {
        CountDownLatch countDownLatch = new CountDownLatch(3);

        MotherThread motherThread = new MotherThread(countDownLatch);
        motherThread.start();

        ChildThread1 c1 = new ChildThread1(countDownLatch);
        c1.setName("大明");
        c1.start();

        ChildThread2 c2 = new ChildThread2(countDownLatch);
        c2.setName("二明");
        c2.start();

        ChildThread3 c3 = new ChildThread3(countDownLatch);
        c3.setName("小明");
        c3.start();
    }
}
